<?php

// File: app/models/m_avoidance_word.php
class MAvoidanceWord extends AppModel {
	
	var $name = 'MAvoidanceWord';
	var $validate = array();
	
	function check_add(){
		
		$this->validate = array(
					'avoidance_word' => array(
						'avoidance_word_not_empty' => array(
							'rule' => 'notEmpty',
							'message' => 'This field is required',
							'last' => true
			)
		),
					'replace_word' => array(
						'replace_word_not_empty' => array(
							'rule' => 'notEmpty',
							'message' => 'This field is required',
							'last' => true
			)
		)
	);
		
		if($this->validates($this->validate))
		return TRUE;
		else
		return FALSE;
	
	} //End check_add()
	
	
	function check_input_text(){
	
		$this->validate = array(
					'data[MAvoidanceWord][textarea]' => array(
						'textarea_not_empty' => array(
							'rule' => 'notEmpty',
							'message' => 'This field is required',
							'last' => true
				)
			),
						
		);
	
		if($this->validates($this->validate))
		return TRUE;
		else
		return FALSE;
	
	} //End check_input_text()
	
} //End Class
?>